<!--_meta 作为公共模版分离出去-->
{include file="public/meta"}
<!--/meta 作为公共模版分离出去-->

<title>领队列表</title>
</head>
<style>
/*分页*/
.pagination {}
.pagination li {display: inline-block;margin-right: -1px;padding: 5px;border: 1px solid #e2e2e2;min-width: 20px;text-align: center;}
.pagination li.active {background: #009688;color: #fff;border: 1px solid #009688;}
.pagination li a {display: block;text-align: center;}
</style>
<body>
<!--_header 作为公共模版分离出去-->
{include file="public/header"}
<!--/_header 作为公共模版分离出去-->

<!--_menu 作为公共模版分离出去-->
{include file="public/menu"}
<!--/_menu 作为公共模版分离出去-->
<section class="Hui-article-box">
	<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 领队管理 <span class="c-gray en">&gt;</span> 领队列表 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
	<div class="Hui-article">
		<article class="cl pd-20">
			<div class="cl pd-5 bg-1 bk-gray mt-20"> </div>
			<div class="mt-20">
				<table class="table table-border table-bordered table-hover table-bg table-sort">
					<thead>
						<tr class="text-c">
							<th width="80">ID</th>
							<th width="100">领队名称</th>
							<th width="100">领队头像</th>
							<th width="80">活动场数</th>
							<th width="90">粉丝</th>
							<th width="100">操作</th>
						</tr>
					</thead>
					<tbody>
					{foreach name="captain" item="val"}
						<tr class="text-c">
							<td>{$val.uid}</td>
							<td>{$val.nickname}</td>
							<td><img src="{$val.userPhoto}" height="50"></td>
							<td>{$val.actNum}</td>
							<td>{$val.fans}</td>
							
							<td class="td-manage"> <a title="删除" href="javascript:;" onclick="captain_del(this,'{$val.uid}')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a></td>
						</tr>
					{/foreach}
					</tbody>
				</table>
				       <div id="page">
                  			<div class="layui-box layui-laypage layui-laypage-default" id="layui-laypage-0">
                			<em class="layui-laypage-em"></em>
            				{$page}
                			</div>
        				</div>
			</div>
		</article>
	</div>
</section>

<!--_footer 作为公共模版分离出去-->
{include file="public/footer"}
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<!-- <script type="text/javascript" src="__PUB__/My97DatePicker/4.8/WdatePicker.js"></script> -->
<script type="text/javascript" src="__PUB__/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__PUB__/laypage/1.2/laypage.js"></script>
<script type="text/javascript">
/*$('.table-sort').dataTable({
	"aaSorting": [[ 1, "desc" ]],//默认第几个排序
	"bStateSave": true,//状态保存
	"aoColumnDefs": [
	  //{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
	  {"orderable":false,"aTargets":[0,8]}// 制定列不参与排序
	]
});*/
/*图片-添加*/
function picture_add(title,url){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*领队修改*/
function picture_edit(title,url,id){
	var index = layer.open({
		type: 2,
		title: title,
		content: url
	});
	layer.full(index);
}
/*领队-删除*/
function captain_del(obj,id){
			if(!confirm('确认要删除吗？')){
				return false;
			}
			$.ajax({
		        url: "{:url('captain/del_captain')}",
		        data:{'id':id},
		        type: "post",
		        dataType: "json",
		        success: function (res) {
		         if (res.state == 1) {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1200);
                    }else {
                        window.parent.layer.msg(res.msg, {icon: 1, time: 1000});
                        setTimeout(function () {
                            window.parent.location.reload();
                        }, 1200);
                    }
		        }
	    	});
		}
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>